<?php

/**
 * Created by PhpStorm.
 * Author: netman
 * Time: 2023/10/16 13:27
 * Desc:签证参数验证
 */
class Request_Api_V2_Visa extends Request_Api_V2_Base
{
    public function __construct($request_param)
    {
        parent::__construct($request_param);
    }


    public function get_visa_list()
    {
        $this->rules = [
            ['page', ['not_empty','digit',$this->rule_min(1)]],
            ['pagesize', ['not_empty','digit',$this->rule_min(1)]],
        ];
        return $this;
    }

    public function get_detail()
    {
        $this->rules = [
            ['product_id', ['not_empty','digit']],
        ];
        return $this;
    }

    public function get_general_query()
    {
        $this->rules = [
            ['page', ['not_empty','digit',$this->rule_min(1)]],
        ];
        return $this;
    }



    public function add_order()
    {
        $this->rules = [
            ['product_id', ['not_empty', 'digit', $this->rule_min(1)]],
            ['ding_num', ['not_empty', 'digit', $this->rule_min(1)]],
            ['linkman', ['not_empty']],
            ['linktel', ['not_empty', 'phone']],
            ['use_date', ['not_empty', $this->rule_date_format('Y-m-d')]],

        ];
        //自定义规则
        $this->validation->rule('mid',array('Rule_Member','need_member'));
        return $this;
    }
}